import { createApp } from 'vue'
// 导入vant组件样式
import 'vant/lib/index.css'
// 导入公共css
import './assets/css/style.css'
import App from './App.vue'
import store from './store'
import router from './router'
import { directives } from '@/utils/common'
// 按需导入vant
import { Button,NavBar,Tabbar,TabbarItem,Checkbox,Toast,Icon,Popup,SwipeItem,Swipe,List,PullRefresh,ActionBarIcon,Search,Loading,Field,SwipeCell,Uploader,Form,ActionSheet,DatetimePicker,Picker,CheckboxGroup, Dialog   } from 'vant'
// 导入移动端适配
import './utils/rem'

const app = createApp(App)
// 传入app到自定义指令 
directives(app)
//挂载pinia
app.use(store)
// 挂载 router
app.use(router)
// 挂载vant 的组件
app.use(Button)
app.use(NavBar)
app.use(Tabbar)
app.use(TabbarItem)
app.use(Checkbox)
app.use(Toast)
app.use(Icon)
app.use(Popup)
app.use(SwipeItem)
app.use(Swipe)
app.use(List)
app.use(PullRefresh)
app.use(ActionBarIcon)
app.use(Search)
app.use(Loading)
app.use(Field)
app.use(SwipeCell)
app.use(Uploader)
app.use(Form)
app.use(ActionSheet)
app.use(DatetimePicker)
app.use(Picker)
app.use(CheckboxGroup)
app.use(Dialog)
// 挂载实例
app.mount('#app')

// createApp(App).use(store).mount('#app')
